package ModelRepresentations;

import java.math.MathContext;

public class NodesAndValues {
	private String node1ID;
	private String node2ID;
	
	private float comparisonValue = 0.0f;
	
	public NodesAndValues(String node1ID, String node2ID, float comparisonValue){
		this.node1ID = node1ID;
		this.node2ID = node2ID;
		this.comparisonValue = comparisonValue;
	}

	public String getNode1ID() {
		return node1ID;
	}

	public void setNode1ID(String node1id) {
		node1ID = node1id;
	}

	public String getNode2ID() {
		return node2ID;
	}

	public void setNode2ID(String node2id) {
		node2ID = node2id;
	}

	public float getComparisonValue() {
		return comparisonValue;
	}

	public void setComparisonValue(float comparisonValue) {
		if(comparisonValue > 1){
			System.out.println("out of range");
			comparisonValue = 1;
		}else if(comparisonValue < 0){
			System.out.println("out of range");
			comparisonValue = 0;
		}else{
			this.comparisonValue = comparisonValue;
		}
	}
	
	public void setAll(String node1ID, String node2ID, float comparisonValue){
		this.node1ID = node1ID;
		this.node2ID = node2ID;
		
		if(comparisonValue > 1){
			System.out.println("out of range");
			comparisonValue = 1;
		}else if(comparisonValue < 0){
			System.out.println("out of range");
			comparisonValue = 0;
		}else{
			this.comparisonValue = comparisonValue;
		}
	}
	
}
